Systems and methods for tracking a model

ABSTRACT

An image such as a depth image of a scene may be received, observed, or captured by a device. A grid of voxels may then be generated based on the depth image such that the depth image may be downsampled. A model may be adjusted based on a location or position of one or more extremities estimated or determined for a human target in the grid of voxels. The model may also be adjusted based on a default location or position of the model in a default pose such as a T-pose, a DaVinci pose, and/or a natural pose.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.13/156457, filed on Jun. 9, 2011, which is a continuation of U.S. parentapplication Ser. No. 12/621,013, filed on Nov. 18, 2009, which is acontinuation-in-part of U.S. patent application Ser. No. 12/575,388,filed on Oct. 7, 2009, the disclosure of each of which is incorporatedherein by reference.

BACKGROUND

Many computing applications such as computer games, multimediaapplications, or the like use controls to allow users to manipulate gamecharacters or other aspects of an application. Typically such controlsare input using, for example, controllers, remotes, keyboards, mice, orthe like. Unfortunately, such controls can be difficult to learn, thuscreating a barrier between a user and such games and applications.Furthermore, such controls may be different from actual game actions orother application actions for which the controls are used. For example,a game control that causes a game character to swing a baseball bat maynot correspond to an actual motion of swinging the baseball bat.

SUMMARY

Disclosed herein are systems and methods for tracking a user in a scene.For example, an image such as depth image of a scene may be received orobserved. A grid of voxels may then be generated based on the depthimage such that the depth image may be downsampled. For example, thedepth image may include a plurality of pixels that may be divided intoportions or blocks. A voxel may then be generated for each portion orblock such that the received depth image may be downsampled into thegrid of voxels.

According to one embodiment, a background included in the grid of voxelsmay then be removed to isolate one or more voxels associated with aforeground object such as a human target. A location or position of oneor more extremities such as a centroid or center, head, shoulders, hips,arms, hands, elbows, legs, feet, knees, or the like of the isolatedhuman target may be determined or estimated. Additionally, dimensionssuch as measurements including widths, lengths, or the like of theextremities may be determined or estimated.

A model may then be tracked or adjusted based on the location orposition of the one or more extremities and/or the dimensions determinedfor the human target. For example, the model may be a skeletal modelthat may include body parts such as joints and/or bones. In oneembodiment, when a location or position may have been estimated for oneor more of the extremities of the human target, one or more of the bodyparts such as the joints and/or bones of the model may be adjusted tothe estimated location or position of the one or more extremitiesassociated therewith. According to another embodiment, when a locationor position may not have been estimated for one or more of theextremities of the human target, one or more body parts such as thejoints and/or bones of the model may be relaxed based on defaultlocations or positions in a default pose such as a T-pose, a DaVincipose, a natural pose or the like. For example, a body part such as ajoint of the model may be relaxed by adjusting the joint to a defaultlocation or position associated with the joint in the default pose suchthat the model may return to a neutral pose. The joints of the model maythen be magnetized or adjusted to a location or position of, forexample, a voxel in the human target that may be closest to the defaultlocation or position.

The model may then be processed. For example, in one embodiment, themodel may be mapped to an avatar or game character such that the avataror game character may be animated to mimic the user and/or the adjustedmodel may be provided to a gestures library in a computing environmentthat may be used to determine controls to perform within an applicationbased on positions of various body parts in the model.

This Summary is provided to introduce a selection of concepts in asimplified form that are further described below in the DetailedDescription. This Summary is not intended to identify key features oressential features of the claimed subject matter, nor is it intended tobe used to limit the scope of the claimed subject matter. Furthermore,the claimed subject matter is not limited to implementations that solveany or all disadvantages noted in any part of this disclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

FIGS. 1A and 1B illustrate an example embodiment of a targetrecognition, analysis, and tracking system with a user playing a game.

FIG. 2 illustrates an example embodiment of a capture device that may beused in a target recognition, analysis, and tracking system.

FIG. 3 illustrates an example embodiment of a computing environment thatmay be used to interpret one or more gestures in a target recognition,analysis, and tracking system and/or animate an avatar or on-screencharacter displayed by a target recognition, analysis, and trackingsystem.

FIG. 4 illustrates another example embodiment of a computing environmentthat may be used to interpret one or more gestures in a targetrecognition, analysis, and tracking system and/or animate an avatar oron-screen character displayed by a target recognition, analysis, andtracking system.

FIG. 5 depicts a flow diagram of an example method for tracking a userin a scene.

FIG. 6 illustrates an example embodiment of a depth image that may becaptured or observed.

FIGS. 7A-7B illustrate an example embodiment of a portion of the depthimage being downsampled.

FIG. 8 illustrates an example embodiment of hands and feet that may becalculated based on arm and leg average positions and/or anchor points.

FIG. 9 illustrates an example embodiment a model that may be generated.

FIG. 10 depicts a flow diagram of an example method for tracking a modelassociated with a user in a scene.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

FIGS. 1A and 1B illustrate an example embodiment of a configuration of atarget recognition, analysis, and tracking system 10 with a user 18playing a boxing game. In an example embodiment, the target recognition,analysis, and tracking system 10 may be used to recognize, analyze,and/or track a human target such as the user 18.

As shown in FIG. 1A, the target recognition, analysis, and trackingsystem 10 may include a computing environment 12. The computingenvironment 12 may be a computer, a gaming system or console, or thelike. According to an example embodiment, the computing environment 12may include hardware components and/or software components such that thecomputing environment 12 may be used to execute applications such asgaming applications, non-gaming applications, or the like. In oneembodiment, the computing environment 12 may include a processor such asa standardized processor, a specialized processor, a microprocessor, orthe like that may execute instructions including, for example,instructions for receiving a depth image; generating a grid of voxelsbased on the depth image; determining whether a location or position hasbeen estimated for an extremity of a human target included the grid ofvoxels; adjusting a body part of a model associated with the extremityto the location or position when, based on the determination, thelocation or position has been estimated for the extremity; and adjustingthe body part of the model to a closest voxel associated with the humantarget when, based on the determination, the location or position hasnot been estimated for the extremity, or any other suitable instruction,which will be described in more detail below.

As shown in FIG. 1A, the target recognition, analysis, and trackingsystem 10 may further include a capture device 20. The capture device 20may be, for example, a camera that may be used to visually monitor oneor more users, such as the user 18, such that gestures and/or movementsperformed by the one or more users may be captured, analyzed, andtracked to perform one or more controls or actions within an applicationand/or animate an avatar or on-screen character, as will be described inmore detail below.

According to one embodiment, the target recognition, analysis, andtracking system 10 may be connected to an audiovisual device 16 such asa television, a monitor, a high-definition television (HDTV), or thelike that may provide game or application visuals and/or audio to a usersuch as the user 18. For example, the computing environment 12 mayinclude a video adapter such as a graphics card and/or an audio adaptersuch as a sound card that may provide audiovisual signals associatedwith the game application, non-game application, or the like. Theaudiovisual device 16 may receive the audiovisual signals from thecomputing environment 12 and may then output the game or applicationvisuals and/or audio associated with the audiovisual signals to the user18. According to one embodiment, the audiovisual device 16 may beconnected to the computing environment 12 via, for example, an S-Videocable, a coaxial cable, an HDMI cable, a DVI cable, a VGA cable, or thelike.

As shown in FIGS. 1A and 1B, the target recognition, analysis, andtracking system 10 may be used to recognize, analyze, and/or track ahuman target such as the user 18. For example, the user 18 may betracked using the capture device 20 such that the gestures and/ormovements of user 18 may be captured to animate an avatar or on-screencharacter and/or may be interpreted as controls that may be used toaffect the application being executed by computing environment 12. Thus,according to one embodiment, the user 18 may move his or her body tocontrol the application and/or animate the avatar or on-screencharacter.

As shown in FIGS. 1A and 1B, in an example embodiment, the applicationexecuting on the computing environment 12 may be a boxing game that theuser 18 may be playing. For example, the computing environment 12 mayuse the audiovisual device 16 to provide a visual representation of aboxing opponent 38 to the user 18. The computing environment 12 may alsouse the audiovisual device 16 to provide a visual representation of aplayer avatar 40 that the user 18 may control with his or her movements.For example, as shown in FIG. 1B, the user 18 may throw a punch inphysical space to cause the player avatar 40 to throw a punch in gamespace. Thus, according to an example embodiment, the computerenvironment 12 and the capture device 20 of the target recognition,analysis, and tracking system 10 may be used to recognize and analyzethe punch of the user 18 in physical space such that the punch may beinterpreted as a game control of the player avatar 40 in game spaceand/or the motion of the punch may be used to animate the player avatar40 in game space.

Other movements by the user 18 may also be interpreted as other controlsor actions and/or used to animate the player avatar, such as controls tobob, weave, shuffle, block, jab, or throw a variety of different powerpunches. Furthermore, some movements may be interpreted as controls thatmay correspond to actions other than controlling the player avatar 40.For example, in one embodiment, the player may use movements to end,pause, or save a game, select a level, view high scores, communicatewith a friend, etc. According to another embodiment, the player may usemovements to select the game or other application from a main userinterface. Thus, in example embodiments, a full range of motion of theuser 18 may be available, used, and analyzed in any suitable manner tointeract with an application.

In example embodiments, the human target such as the user 18 may have anobject. In such embodiments, the user of an electronic game may beholding the object such that the motions of the player and the objectmay be used to adjust and/or control parameters of the game. Forexample, the motion of a player holding a racket may be tracked andutilized for controlling an on-screen racket in an electronic sportsgame. In another example embodiment, the motion of a player holding anobject may be tracked and utilized for controlling an on-screen weaponin an electronic combat game.

According to other example embodiments, the target recognition,analysis, and tracking system 10 may further be used to interpret targetmovements as operating system and/or application controls that areoutside the realm of games. For example, virtually any controllableaspect of an operating system and/or application may be controlled bymovements of the target such as the user 18.

FIG. 2 illustrates an example embodiment of the capture device 20 thatmay be used in the target recognition, analysis, and tracking system 10.According to an example embodiment, the capture device 20 may beconfigured to capture video with depth information including a depthimage that may include depth values via any suitable techniqueincluding, for example, time-of-flight, structured light, stereo image,or the like. According to one embodiment, the capture device 20 mayorganize the depth information into “Z layers,” or layers that may beperpendicular to a Z axis extending from the depth camera along its lineof sight.

As shown in FIG. 2, the capture device 20 may include an image cameracomponent 22. According to an example embodiment, the image cameracomponent 22 may be a depth camera that may capture the depth image of ascene. The depth image may include a two-dimensional (2-D) pixel area ofthe captured scene where each pixel in the 2-D pixel area may representa depth value such as a length or distance in, for example, centimeters,millimeters, or the like of an object in the captured scene from thecamera.

As shown in FIG. 2, according to an example embodiment, the image cameracomponent 22 may include an IR light component 24, a three-dimensional(3-D) camera 26, and an RGB camera 28 that may be used to capture thedepth image of a scene. For example, in time-of-flight analysis, the IRlight component 24 of the capture device 20 may emit an infrared lightonto the scene and may then use sensors (not shown) to detect thebackscattered light from the surface of one or more targets and objectsin the scene using, for example, the 3-D camera 26 and/or the RGB camera28. In some embodiments, pulsed infrared light may be used such that thetime between an outgoing light pulse and a corresponding incoming lightpulse may be measured and used to determine a physical distance from thecapture device 20 to a particular location on the targets or objects inthe scene. Additionally, in other example embodiments, the phase of theoutgoing light wave may be compared to the phase of the incoming lightwave to determine a phase shift. The phase shift may then be used todetermine a physical distance from the capture device to a particularlocation on the targets or objects.

According to another example embodiment, time-of-flight analysis may beused to indirectly determine a physical distance from the capture device20 to a particular location on the targets or objects by analyzing theintensity of the reflected beam of light over time via varioustechniques including, for example, shuttered light pulse imaging.

In another example embodiment, the capture device 20 may use astructured light to capture depth information. In such an analysis,patterned light (i.e., light displayed as a known pattern such as gridpattern or a stripe pattern) may be projected onto the scene via, forexample, the IR light component 24. Upon striking the surface of one ormore targets or objects in the scene, the pattern may become deformed inresponse. Such a deformation of the pattern may be captured by, forexample, the 3-D camera 26 and/or the RGB camera 28 and may then beanalyzed to determine a physical distance from the capture device to aparticular location on the targets or objects.

According to another embodiment, the capture device 20 may include twoor more physically separated cameras that may view a scene fromdifferent angles to obtain visual stereo data that may be resolved togenerate depth information.

The capture device 20 may further include a microphone 30. Themicrophone 30 may include a transducer or sensor that may receive andconvert sound into an electrical signal. According to one embodiment,the microphone 30 may be used to reduce feedback between the capturedevice 20 and the computing environment 12 in the target recognition,analysis, and tracking system 10. Additionally, the microphone 30 may beused to receive audio signals that may also be provided by the user tocontrol applications such as game applications, non-game applications,or the like that may be executed by the computing environment 12.

In an example embodiment, the capture device 20 may further include aprocessor 32 that may be in operative communication with the imagecamera component 22. The processor 32 may include a standardizedprocessor, a specialized processor, a microprocessor, or the like thatmay execute instructions including, for example, instructions forreceiving a depth image; generating a grid of voxels based on the depthimage; determining whether a location or position has been estimated foran extremity of a human target included the grid of voxels; adjusting abody part of a model associated with the extremity to the location orposition when, based on the determination, the location or position hasbeen estimated for the extremity; and adjusting the body part of themodel to a closest voxel associated with the human target when, based onthe determination, the location or position has not been estimated forthe extremity, or any other suitable instruction, which will bedescribed in more detail below.

The capture device 20 may further include a memory component 34 that maystore the instructions that may be executed by the processor 32, imagesor frames of images captured by the 3-D camera or RGB camera, or anyother suitable information, images, or the like. According to an exampleembodiment, the memory component 34 may include random access memory(RAM), read only memory (ROM), cache, Flash memory, a hard disk, or anyother suitable storage component. As shown in FIG. 2, in one embodiment,the memory component 34 may be a separate component in communicationwith the image camera component 22 and the processor 32. According toanother embodiment, the memory component 34 may be integrated into theprocessor 32 and/or the image capture component 22.

As shown in FIG. 2, the capture device 20 may be in communication withthe computing environment 12 via a communication link 36. Thecommunication link 36 may be a wired connection including, for example,a USB connection, a Firewire connection, an Ethernet cable connection,or the like and/or a wireless connection such as a wireless 802.11b, g,a, or n connection. According to one embodiment, the computingenvironment 12 may provide a clock to the capture device 20 that may beused to determine when to capture, for example, a scene via thecommunication link 36.

Additionally, the capture device 20 may provide the depth informationand images captured by, for example, the 3-D camera 26 and/or the RGBcamera 28, and/or a skeletal model that may be generated by the capturedevice 20 to the computing environment 12 via the communication link 36.The computing environment 12 may then use the model, depth information,and captured images to, for example, control an application such as agame or word processor and/or animate an avatar or on-screen character.For example, as shown, in FIG. 2, the computing environment 12 mayinclude a gestures library 190. The gestures library 190 may include acollection of gesture filters, each comprising information concerning agesture that may be performed by the skeletal model (as the user moves).The data captured by the cameras 26, 28 and the capture device 20 in theform of the skeletal model and movements associated with it may becompared to the gesture filters in the gestures library 190 to identifywhen a user (as represented by the skeletal model) has performed one ormore gestures. Those gestures may be associated with various controls ofan application. Thus, the computing environment 12 may use the gestureslibrary 190 to interpret movements of the skeletal model and to controlan application based on the movements.

FIG. 3 illustrates an example embodiment of a computing environment thatmay be used to interpret one or more gestures in a target recognition,analysis, and tracking system and/or animate an avatar or on-screencharacter displayed by the target recognition, analysis, and trackingsystem. The computing environment such as the computing environment 12described above with respect to FIGS. 1A-2 may be a multimedia console100, such as a gaming console. As shown in FIG. 3, the multimediaconsole 100 has a central processing unit (CPU) 101 having a level 1cache 102, a level 2 cache 104, and a flash ROM (Read Only Memory) 106.The level 1 cache 102 and a level 2 cache 104 temporarily store data andhence reduce the number of memory access cycles, thereby improvingprocessing speed and throughput. The CPU 101 may be provided having morethan one core, and thus, additional level 1 and level 2 caches 102 and104. The flash ROM 106 may store executable code that is loaded duringan initial phase of a boot process when the multimedia console 100 ispowered ON.

A graphics processing unit (GPU) 108 and a video encoder/video codec(coder/decoder) 114 form a video processing pipeline for high speed andhigh resolution graphics processing. Data is carried from thegraphics-processing unit 108 to the video encoder/video codec 114 via abus. The video processing pipeline outputs data to an A/V (audio/video)port 140 for transmission to a television or other display. A memorycontroller 110 is connected to the GPU 108 to facilitate processoraccess to various types of memory 112, such as, but not limited to, aRAM (Random Access Memory).

The multimedia console 100 includes an I/O controller 120, a systemmanagement controller 122, an audio processing unit 123, a networkinterface controller 124, a first USB host controller 126, a second USBcontroller 128 and a front panel I/O subassembly 130 that are preferablyimplemented on a module 118. The USB controllers 126 and 128 serve ashosts for peripheral controllers 142(1)-142(2), a wireless adapter 148,and an external memory device 146 (e.g., flash memory, external CD/DVDROM drive, removable media, etc.). The network interface controller 124and/or wireless adapter 148 provide access to a network (e.g., theInternet, home network, etc.) and may be any of a wide variety ofvarious wired or wireless adapter components including an Ethernet card,a modem, a Bluetooth module, a cable modem, and the like.

System memory 143 is provided to store application data that is loadedduring the boot process. A media drive 144 is provided and may comprisea DVD/CD drive, hard drive, or other removable media drive, etc. Themedia drive 144 may be internal or external to the multimedia console100. Application data may be accessed via the media drive 144 forexecution, playback, etc. by the multimedia console 100. The media drive144 is connected to the I/O controller 120 via a bus, such as a SerialATA bus or other high-speed connection (e.g., IEEE 1394).

The system management controller 122 provides a variety of servicefunctions related to assuring availability of the multimedia console100. The audio processing unit 123 and an audio codec 132 form acorresponding audio processing pipeline with high fidelity and stereoprocessing. Audio data is carried between the audio processing unit 123and the audio codec 132 via a communication link. The audio processingpipeline outputs data to the A/V port 140 for reproduction by anexternal audio player or device having audio capabilities.

The front panel I/O subassembly 130 supports the functionality of thepower button 150 and the eject button 152, as well as any LEDs (lightemitting diodes) or other indicators exposed on the outer surface of themultimedia console 100. A system power supply module 136 provides powerto the components of the multimedia console 100. A fan 138 cools thecircuitry within the multimedia console 100.

The CPU 101, GPU 108, memory controller 110, and various othercomponents within the multimedia console 100 are interconnected via oneor more buses, including serial and parallel buses, a memory bus, aperipheral bus, and a processor or local bus using any of a variety ofbus architectures. By way of example, such architectures can include aPeripheral Component Interconnects (PCI) bus, PCI-Express bus, etc.

When the multimedia console 100 is powered ON, application data may beloaded from the system memory 143 into memory 112 and/or caches 102, 104and executed on the CPU 101. The application may present a graphicaluser interface that provides a consistent user experience whennavigating to different media types available on the multimedia console100. In operation, applications and/or other media contained within themedia drive 144 may be launched or played from the media drive 144 toprovide additional functionalities to the multimedia console 100.

The multimedia console 100 may be operated as a standalone system bysimply connecting the system to a television or other display. In thisstandalone mode, the multimedia console 100 allows one or more users tointeract with the system, watch movies, or listen to music. However,with the integration of broadband connectivity made available throughthe network interface 124 or the wireless adapter 148, the multimediaconsole 100 may further be operated as a participant in a larger networkcommunity.

When the multimedia console 100 is powered ON, a set amount of hardwareresources are reserved for system use by the multimedia consoleoperating system. These resources may include a reservation of memory(e.g., 16 MB), CPU and GPU cycles (e.g., 5%), networking bandwidth(e.g., 8 kbs), etc. Because these resources are reserved at system boottime, the reserved resources do not exist from the application's view.

In particular, the memory reservation preferably is large enough tocontain the launch kernel, concurrent system applications and drivers.The CPU reservation is preferably constant such that if the reserved CPUusage is not used by the system applications, an idle thread willconsume any unused cycles.

With regard to the GPU reservation, lightweight messages generated bythe system applications (e.g., popups) are displayed by using a GPUinterrupt to schedule code to render popup into an overlay. The amountof memory required for an overlay depends on the overlay area size andthe overlay preferably scales with screen resolution. Where a full userinterface is used by the concurrent system application, it is preferableto use a resolution independent of application resolution. A scaler maybe used to set this resolution such that the need to change frequencyand cause a TV resynch is eliminated.

After the multimedia console 100 boots and system resources arereserved, concurrent system applications execute to provide systemfunctionalities. The system functionalities are encapsulated in a set ofsystem applications that execute within the reserved system resourcesdescribed above. The operating system kernel identifies threads that aresystem application threads versus gaming application threads. The systemapplications are preferably scheduled to run on the CPU 101 atpredetermined times and intervals in order to provide a consistentsystem resource view to the application. The scheduling is to minimizecache disruption for the gaming application running on the console.

When a concurrent system application requires audio, audio processing isscheduled asynchronously to the gaming application due to timesensitivity. A multimedia console application manager (described below)controls the gaming application audio level (e.g., mute, attenuate) whensystem applications are active.

Input devices (e.g., controllers 142(1) and 142(2)) are shared by gamingapplications and system applications. The input devices are not reservedresources, but are to be switched between system applications and thegaming application such that each will have a focus of the device. Theapplication manager preferably controls the switching of input stream,without knowledge the gaming application's knowledge and a drivermaintains state information regarding focus switches. The cameras 26, 28and capture device 20 may define additional input devices for themultimedia console 100.

FIG. 4 illustrates another example embodiment of a computing environment220 that may be the computing environment 12 shown in FIGS. 1A-2 used tointerpret one or more gestures in a target recognition, analysis, andtracking system and/or animate an avatar or on-screen characterdisplayed by a target recognition, analysis, and tracking system. Thecomputing environment 220 is only one example of a suitable computingenvironment and is not intended to suggest any limitation as to thescope of use or functionality of the presently disclosed subject matter.Neither should the computing environment 220 be interpreted as havingany dependency or requirement relating to any one or combination ofcomponents illustrated in the exemplary computing environment 220. Insome embodiments the various depicted computing elements may includecircuitry configured to instantiate specific aspects of the presentdisclosure. For example, the term circuitry used in the disclosure caninclude specialized hardware components configured to performfunction(s) by firmware or switches. In other examples embodiments theterm circuitry can include a general-purpose processing unit, memory,etc., configured by software instructions that embody logic operable toperform function(s). In example embodiments where circuitry includes acombination of hardware and software, an implementer may write sourcecode embodying logic and the source code can be compiled intomachine-readable code that can be processed by the general-purposeprocessing unit. Since one skilled in the art can appreciate that thestate of the art has evolved to a point where there is little differencebetween hardware, software, or a combination of hardware/software, theselection of hardware versus software to effectuate specific functionsis a design choice left to an implementer. More specifically, one ofskill in the art can appreciate that a software process can betransformed into an equivalent hardware structure, and a hardwarestructure can itself be transformed into an equivalent software process.Thus, the selection of a hardware implementation versus a softwareimplementation is one of design choice and left to the implementer.

In FIG. 4, the computing environment 220 comprises a computer 241, whichtypically includes a variety of computer readable media. Computerreadable media can be any available media that can be accessed bycomputer 241 and includes both volatile and nonvolatile media, removableand non-removable media. The system memory 222 includes computer storagemedia in the form of volatile and/or nonvolatile memory such as readonly memory (ROM) 223 and random access memory (RAM) 260. A basicinput/output system 224 (BIOS), containing the basic routines that helpto transfer information between elements within computer 241, such asduring start-up, is typically stored in ROM 223. RAM 260 typicallycontains data and/or program modules that are immediately accessible toand/or presently being operated on by processing unit 259. By way ofexample, and not limitation, FIG. 4 illustrates operating system 225,application programs 226, other program modules 227, and program data228.

The computer 241 may also include other removable/non-removable,volatile/nonvolatile computer storage media. By way of example only,FIG. 4 illustrates a hard disk drive 238 that reads from or writes tonon-removable, nonvolatile magnetic media, a magnetic disk drive 239that reads from or writes to a removable, nonvolatile magnetic disk 254,and an optical disk drive 240 that reads from or writes to a removable,nonvolatile optical disk 253 such as a CD ROM or other optical media.Other removable/non-removable, volatile/nonvolatile computer storagemedia that can be used in the exemplary operating environment include,but are not limited to, magnetic tape cassettes, flash memory cards,digital versatile disks, digital video tape, solid state RAM, solidstate ROM, and the like. The hard disk drive 238 is typically connectedto the system bus 221 through a non-removable memory interface such asinterface 234, and magnetic disk drive 239 and optical disk drive 240are typically connected to the system bus 221 by a removable memoryinterface, such as interface 235.

The drives and their associated computer storage media discussed aboveand illustrated in FIG. 4, provide storage of computer readableinstructions, data structures, program modules and other data for thecomputer 241. In FIG. 4, for example, hard disk drive 238 is illustratedas storing operating system 258, application programs 257, other programmodules 256, and program data 255. Note that these components can eitherbe the same as or different from operating system 225, applicationprograms 226, other program modules 227, and program data 228. Operatingsystem 258, application programs 257, other program modules 256, andprogram data 255 are given different numbers here to illustrate that, ata minimum, they are different copies. A user may enter commands andinformation into the computer 241 through input devices such as akeyboard 251 and pointing device 252, commonly referred to as a mouse,trackball or touch pad. Other input devices (not shown) may include amicrophone, joystick, game pad, satellite dish, scanner, or the like.These and other input devices are often connected to the processing unit259 through a user input interface 236 that is coupled to the systembus, but may be connected by other interface and bus structures, such asa parallel port, game port or a universal serial bus (USB). The cameras26, 28 and capture device 20 may define additional input devices for theconsole 100. A monitor 242 or other type of display device is alsoconnected to the system bus 221 via an interface, such as a videointerface 232. In addition to the monitor, computers may also includeother peripheral output devices such as speakers 244 and printer 243,which may be connected through an output peripheral interface 233.

The computer 241 may operate in a networked environment using logicalconnections to one or more remote computers, such as a remote computer246. The remote computer 246 may be a personal computer, a server, arouter, a network PC, a peer device or other common network node, andtypically includes many or all of the elements described above relativeto the computer 241, although only a memory storage device 247 has beenillustrated in FIG. 4. The logical connections depicted in FIG. 2include a local area network (LAN) 245 and a wide area network (WAN)249, but may also include other networks. Such networking environmentsare commonplace in offices, enterprise-wide computer networks, intranetsand the Internet.

When used in a LAN networking environment, the computer 241 is connectedto the LAN 245 through a network interface or adapter 237. When used ina WAN networking environment, the computer 241 typically includes amodem 250 or other means for establishing communications over the WAN249, such as the Internet. The modem 250, which may be internal orexternal, may be connected to the system bus 221 via the user inputinterface 236, or other appropriate mechanism. In a networkedenvironment, program modules depicted relative to the computer 241, orportions thereof, may be stored in the remote memory storage device. Byway of example, and not limitation, FIG. 4 illustrates remoteapplication programs 248 as residing on memory storage device 247. Itwill be appreciated that the network connections shown are exemplary andother means of establishing a communications link between the computersmay be used.

FIG. 5 depicts a flow diagram of an example method 300 for tracking auser in a scene. The example method 300 may be implemented using, forexample, the capture device 20 and/or the computing environment 12 ofthe target recognition, analysis, and tracking system 10 described withrespect to FIGS. 1A-4. In an example embodiment, the example method 300may take the form of program code (i.e., instructions) that may beexecuted by, for example, the capture device 20 and/or the computingenvironment 12 of the target recognition, analysis, and tracking system10 described with respect to FIGS. 1A-4.

According to one embodiment, at 305, a depth image may be received. Forexample, the target recognition, analysis, and tracking system mayinclude a capture device such as the capture device 20 described abovewith respect to FIGS. 1A-2. The capture device may capture or observe ascene that may include one or more targets. In an example embodiment,the capture device may be a depth camera configured to obtain an imagesuch as a depth image of the scene using any suitable technique such astime-of-flight analysis, structured light analysis, stereo visionanalysis, or the like.

The depth image may be a plurality of observed pixels where eachobserved pixel has an observed depth value. For example, the depth imagemay include a two-dimensional (2-D) pixel area of the captured scenewhere each pixel in the 2-D pixel area may have a depth value such as alength or distance in, for example, centimeters, millimeters, or thelike of an object in the captured scene from the capture device.

FIG. 6 illustrates an example embodiment of a depth image 400 that maybe received at 305. According to an example embodiment, the depth image400 may be an image or frame of a scene captured by, for example, the3-D camera 26 and/or the RGB camera 28 of the capture device 20described above with respect to FIG. 2. As shown in FIG. 6, the depthimage 400 may include a human target 402 a corresponding to, forexample, a user such as the user 18 described above with respect toFIGS. 1A and 1B and one or more non-human targets 404 such as a wall, atable, a monitor, or the like in the captured scene. As described above,the depth image 400 may include a plurality of observed pixels whereeach observed pixel has an observed depth value associated therewith.For example, the depth image 400 may include a two-dimensional (2-D)pixel area of the captured scene where each pixel at a particularX-value and Y-value in the 2-D pixel area may have a depth value such asa length or distance in, for example, centimeters, millimeters, or thelike of a target or object in the captured scene from the capturedevice.

In one embodiment, the depth image 400 may be colorized such thatdifferent colors of the pixels of the depth image correspond to and/orvisually depict different distances of the human target 402 a andnon-human targets 404 from the capture device. For example, the pixelsassociated with a target closest to the capture device may be coloredwith shades of red and/or orange in the depth image whereas the pixelsassociated with a target further away may be colored with shades ofgreen and/or blue in the depth image.

Referring back to FIG. 5, in one embodiment, upon receiving the image,at 305, one or more high-variance and/or noisy depth values may beremoved and/or smoothed from the depth image; portions of missing and/orremoved depth information may be filled in and/or reconstructed; and/orany other suitable processing may be performed on the received depthimage may such that the depth information associated with the depthimage may used to generate a model such as a skeletal model, which willbe described in more detail below.

According to an example embodiment, at 310, a grid of one or more voxelsmay be generated based on the received depth image. For example, thetarget recognition, analysis, and tracking system may downsample thereceived depth image by generating one or more voxels using informationincluded in the received depth image such that a downsampled depth imagemay be generated. In one embodiment, the one or more voxels may bevolume elements that may represent data or values of the informationincluded in the received depth image on a sub-sampled grid.

For example, as described above, the depth image may include a 2-D pixelarea of the captured scene where each pixel may have an X-value, aY-value, and a depth value (or Z-value) associated therewith. In oneembodiment, the depth image may be downsampled by reducing the pixels inthe 2-D pixel area into a grid of one or more voxels. For example, thedepth image may be divided into portions or blocks of pixels such as 4×4blocks of pixels, 5×5 blocks of pixels, 8×8 block of pixels, a 10×10block of pixels, or the like. Each portion or block may be processed togenerate a voxel for the depth image that may represent a position ofthe portion or block associated the pixels of the 2-D depth image inreal-world space. According to an example embodiment, the position ofeach voxel may be generated based on, for example, an average depthvalue of the valid or non-zero depth values for the pixels in the blockor portion that the voxel may represent, a minimum, maximum, and/or amedian depth value of the pixels in the portion or block that the voxelmay represent, an average of the X-values and Y-values for pixels havinga valid depth value in the portion or the block that the voxel mayrepresent, or any other suitable information provided by the depthimage. Thus, according to an example embodiment, each voxel mayrepresent a sub-volume portion or block of the depth image having valuessuch as an average depth value of the valid or non-zero depth values forthe pixels in the block or portion that the voxel may represent, aminimum, maximum, and/or a median depth value of the pixels in theportion or block that the voxel may represent, an average of theX-values and Y-values for pixels having a valid depth value in theportion or the block that the voxel may represent, or any other suitableinformation provided by the depth image based on the X-values, Y-values,and depth values of the corresponding portion or block of pixels of thedepth image received at 305.

In one embodiment, the grid of the one or more voxels in the downsampleddepth image may be layered. For example, the target recognition,analysis, and tracking system may generate voxels as described above.The target recognition, analysis, and tracking system may then stack agenerated voxel over one or more other generated voxels in the grid.

According to an example embodiment, the target recognition, analysis,and tracking system may stack voxels in the grid around, for example,edges of objects in the scene that may be captured in the depth image.For example, a depth image received at 305 may include a human targetand a non-human target such as a wall. The human target may overlap thenon-human target such as the wall at, for example, an an edge of thehuman target. In one embodiment, the overlapping edge may includeinformation such as depth values, X-values, Y-values, or the likeassociated with the human target and the non-human target that may becaptured in the depth image. The target recognition, analyisis, andtracking system may generate a voxel associated with the human targetand a voxel associated with the non-human target at the overlapping edgesuch that the voxels may be stacked and the information such as depthvalues, X-values, Y-values, or the like of the overlapping edge may beretained in the grid.

According to another embodiment, the grid of one or more voxels may begenerated at 310 by projecting, for example, information such as thedepth values, X-values, Y-values, or the like into three-dimensional(3-D) space. For example, depth values may be mapped to 3-D points inthe 3-D space using a transformation such as a camera, image, orperspective transform such that the information may be transformed astrapezoidal or pyramidal shapes in the 3-D space. In one embodiment, the3-D space having the trapezoidal or pyramidal shapes may be divided intoblocks such as cubes that may create a grid of voxels such that each ofthe blocks or cubes may represent a voxel in the grid. For example, thetarget recognition, analysis, and tracking system may superimpose a 3-Dgrid over the 3-D points that correspond to the object in the depthimage. The target recognition, analysis, and tracking system may thendivide or chop up the grid into the blocks representing voxels todownsample the depth image into a lower resolution. According to anexample embodiment, each of the voxels in the grid may include anaverage depth value of the valid or non-zero depth values for the pixelsassociated with the 3-D space in the grid. This may allow the voxel torepresent a minimum and/or maximum depth value of the pixels associatedwith the 3-D space in the grid; an average of the X-values and Y-valuesfor pixels having a valid depth value associated with the 3-D space; orany other suitable information provided by the depth image.

FIGS. 7A-7B illustrate an example embodiment of a portion of the depthimage being downsampled. For example, as shown in FIG. 7A, a portion 410of the depth image 400 described above with respect to FIG. 6 mayinclude a plurality of pixels 420 where each pixel 420 may have anX-value, a Y-value, and a depth value (or Z-value) associated therewith.According to one embodiment, as described above, a depth image such asthe depth image 400 may be downsampled by reducing the pixels in the 2-Dpixel area into a grid of one or more voxels. For example, as shown inFIGS. 7A, the portion 410 of the depth image 400 may be divided into aportion or a block 430 of the pixels 420 such as 8×8 block of the pixels420. The target recognition, analysis, and tracking system may processthe portion or block 430 to generate a voxel 440 that may represent aposition of the portion or block 430 associated the pixels 420 inreal-world space as shown in FIGS. 7A-7B.

Referring back to FIG. 5, at 315, the background may be removed from thedownsampled depth image. For example, a background such as the non-humantargets or objects in the downsampled depth image may be removed toisolate foreground objects such as a human target associated with auser. As described above, the target recognition, analysis, and trackingsystem may downsample a captured or observed depth image by generating agrid of one or more voxels for the captured or observed depth image. Thetarget recognition, analysis, and tracking system may analyze each ofthe voxels in the downsampled depth image to determine whether a voxelmay be associated with a background object such as one or more non-humantargets of the depth image. If a voxel may be associated with abackground object, the voxel may be removed or discarded from thedownsampled depth image such that a foreground object, such as the humantarget, and the one or more voxels in the grid associated with theforeground object may be isolated.

At 320, one or more extremities such as one or more body parts may bedetermined or estimated for the isolated foreground object such as thehuman target. For example, in one embodiment, the target recognition,analysis, and tracking system may apply one or more heuristics or rulesto the isolated human target to determine, for example, a centroid orcenter, a head, shoulders, a torso, arms, legs, or the like associatedwith the isolated human target. According to one embodiment, based onthe determination of the extremities, the target recognition, analysis,and tracking system may generate and/or track or adjust a model of theisolated human target. For example, if the depth image received at 305may be included in an initial frame observed or captured by a capturedevice such as the capture device 20 described above with respect toFIGS. 1A-2, a model may be generated based on the location of theextremities such as the centroid, head, shoulders, arms, hands, legs, orthe like determined at 320 by, for example, assigning a joint of theskeletal model to the determined locations of the extremities, whichwill be described in more detail below. Alternatively, if the depthimage may be included in a subsequent or non-initial frame observed orcaptured by the capture device, a model that may have been previouslygenerated may be tracked or adjusted based on the location of theextremities such as the centroid, head, shoulders, arms, hands, legs, orthe like determined at 320, which will be described in more detailbelow.

According to an example embodiment, upon isolating the foreground objectsuch as the human target at 315, the target recognition, analysis, andtracking system may calculate an average of the voxels in the humantarget to, for example, estimate a centroid or center of the humantarget at 320. For example, the target recognition, analysis, andtracking system may calculate an average position of the voxels includedin the human target that may provide an estimate of the centroid orcenter of the human target. In one embodiment, the target recognition,analysis, and tracking system may calculate the average position of thevoxels associated with the human target based on X-values, Y-values, anddepth values associated with the voxels. For example, as describedabove, the target recognition, analysis, and tracking system maycalculate an X-value for a voxel by averaging the X-values of the pixelsassociated with the voxel, a Y-value for the voxel by averaging theY-values of the pixels associated with the voxel, and a depth value forthe voxel by averaging the depth values of the pixels associated withthe voxel. At 320, the target recognition, analysis, and tracking systemmay average the X-values, the Y-values, and the depth values of thevoxels included in the human target to calculate the average positionthat may provide the estimate of the centroid or center of the humantarget.

The target recognition, analysis, and tracking system may then determinea head of the human target at 320. For example, in one embodiment, thetarget recognition, analysis, and tracking system may determine aposition or location of the head by searching for various candidates atpositions or locations suitable for the head. According to oneembodiment, the target recognition, analysis, and tracking system maysearch for an absolute highest voxel of the human target and/or voxelsadjacent to or near the absolute highest voxel, one or more incrementalvoxels based on the location of the head determined for a previousframe, a highest voxel on an upward vector that may extend verticallyfrom, for example, the centroid or center and/or voxels adjacent or nearthe highest voxel determined for a previous frame, a highest voxel on aprevious upward vector between a center or centroid and a highest voxeldetermined for a previous frame, or any other suitable voxels todetermine a candidate for the extremity such as the head.

The target recognition, analysis, and tracking system may then score thecandidates. In an example embodiment, the candidates may be scored based3-D pattern matching. For example, the target recognition, analysis, andtracking system may create a head cylinder and a shoulder cylinder. Thetarget recognition, analysis, and tracking system may then calculate ascore for the candidates based on the number of voxels associated withthe candidates that may be included in the head cylinder and/or shouldercylinders.

According to one embodiment, if a score associated with one of thecandidate exceeds a head threshold score, the target recognition,analysis, and tracking system may determine a position or location ofthe head based on the voxels associated with the candidate at 320.Additionally, if more than one candidate exceeds the head thresholdscore, the target recognition, analysis, and tracking system may selectthe candidate that may have the highest score and may then determine theposition or location of the extremity such as the head based on thevoxels associated with the candidate that may have the highest score.none of the scores associated with the candidates exceeds the headthreshold score, the target recognition, analysis, and tracking systemmay use a previous position or location of the head determined forvoxels included in a human target associated with a depth image of aprevious frame in which the head score may have exceed the headthreshold score or the target recognition, analysis, and tracking systemmay use a default position or location for a head in a default pose of ahuman target such as a T-pose, a natural standing pose or the like, ifthe depth image received at 305 may be in an initial frame captured orobserved by the capture device.

According to another embodiment, the target recognition, analysis, andtracking system may include one or more two-dimensional (2-D) patternsassociated with, for example, a head shape. The target recognition,analysis, and tracking system may then score the candidates associatedwith the head based on a likelihood that the voxels associated with thecandidates may may be similar to the head shapes of the one or more 2-Dpatterns. For example, the target recognition, analysis, and trackingsystem may determine and sample depths values of adjacent or nearbyvoxels that may be indicative of defining an extremity shape such as ahead shape such that a score may be calculated based on a likelihood thesmpaled depth values of adjacent or nearby voxels may be indicative ofone or more of the head shapes of the 2-D patterns.

The target recognition, analysis, and tracking system may furtherdetermine the shoulders and hips of the human target at 320. Forexample, in one embodiment, after determining the location or positionof the head of the human target, the target recognition, analysis, andtracking system may determine a location or a position of the shouldersand the hips of the human target. The target recognition, analysis, andtracking system may also determine an orientation of the shoulders andthe hips such as a rotation or angle of the shoulders and the hips. Forexample, the target recognition, analysis, and tracking system maydefine a head-to-center vector based on the location or positions of thehead and center determined or estimated at 320. The target recognition,analysis, and tracking system may then determine or estimate thelocation or position of the shoulders and/or hips by defining respectivevolume boxes around a displacement value from a body landmark such asthe head or center along the head-to-center vector. The targetrecognition, analysis, and tracking system may then analyze the voxelsincluded in the respective volume boxes to estimate a location andposition of, for example, joints associated the shoulders and/or hips aswell as an orientation of the shoulders and/or hips. For example, thetarget recognition, analysis, and tracking system may calculate a lineof best fit for the depth values of the voxels in the respective volumeboxes including any mirrored depth values to define respective slopes ofthe shoulders and/or hips, may search in each direction along therespective slopes to detect edges and may assign joints of the shouldersand/or hips based on a displacement from the edges, or may perform anyother suitable technique that may be used to determine or estimate thelocation or position of the shoulders or hips.

In one example embodiment, the target recognition, analysis, andtracking system may further determine the torso of the human target at320. For example, after determining the shoulders and the hips, thetarget recognition, analysis, and tracking system may generate or createa torso volume that may include the voxel associated with andsurrounding the head, the shoulders, the center, and the hips. The torsovolume may be a cylinder, a pill shape such as a cylinder with roundedends, or the like based on the location or position of the center, thehead, the shoulders, and/or the hips.

According to one embodiment, the target recognition, analysis, andtracking system may create a cylinder that may represent the torsovolume having dimensions based on the shoulders, the head, the hips, thecenter, or the like. For example, the target recognition, analysis, andtracking system may create a cylinder that may have a width or adiameter based on the width of the shoulders and a height based on thedistance between the head and the hips. The target recognition,analysis, and tracking system may then orient or angle the cylinder thatmay represent the torso volume along the head-to-center vector such thatthe torso volume may reflect the orientation such as the angle of thetorso of the human target.

The target recognition, analysis, and tracking system may then estimateor determine the limbs of the human target at 320. For example, thetarget recognition, analysis, and tracking system may coarsely labelvoxels outside the torso volume as a limb after generating or creatingthe torso volume. In one embodiment, the target recognition, analysis,and tracking system may identify each of the voxels outside of the torsovolume such that the target recognition, analysis, and tracking systemmay label the voxels as being part of a limb.

The target recognition, analysis, and tracking system may then determinethe actual limbs such as a right and left arm, a right and left hand, aright and left leg, a right and left foot, or the like associated withthe voxels outside of the torso volume. In one embodiment, to determinethe actual limbs, the target recognition, analysis, and tracking systemmay compare a previous position or location of an identified limb suchas the previous position or location of the right arm, left arm, leftleg, right leg, or the like with the position or location of the voxelsoutside of the torso volume. According to example embodiments, theprevious location or position of the previously identified limbs may bea location or position of a limb in a depth image received in a previousframe, a projected body part location or position based on a previousmovement, or any other suitable previous location or position of arepresentation of a human target such as a fully articulated skeleton orvolumetric model of the human target. Based on the comparison, thetarget recognition, analysis, and tracking system may then associate thevoxels outside of the torso volume with the closest previouslyidentified limbs. For example, the target recognition, analysis, andtracking system may compare the position or location including theX-value, Y-value, and depth value of each of the voxels outside of thetorso volume with the previous positions or locations including theX-values, Y-values, and depth values of the previously identified limbssuch as the previously identified left arm, right arm, left leg, rightleg, or the like. The target recognition, analysis, and tracking systemmay then associate each of the voxels outside the torso volume with thepreviously identified limb that may have the closest location orposition based on the comparison.

In another embodiment, to determine the actual limbs, the targetrecognition, analysis, and tracking system may compare a defaultposition or location of an identified limb such as the right arm, leftarm, right leg, left leg, or the like in a default pose of arepresentation of a human target with the position or location of thevoxels outside of the torso volume. For example, the depth imagereceived at 305 may be included in an initial frame captured or observedby the capture device. If the depth image received at 305 may beincluded in an initial frame, the target recognition, analysis, andtracking may compare a default position or location of a limb such asthe default position or location of a right arm, left arm, left leg,right leg, or the like with the position or location of the voxelsoutside of the torso volume. According to example embodiments, thedefault location or position of the identified limbs may be a locationor position of a limb in a default pose such as a T-pose, a Di Vincipose, a natural pose, or the like of a representation of a human targetsuch as a fully articulated skeleton or volumetric model of the humantarget in the default pose. Based on the comparison, the targetrecognition, analysis, and tracking system may then associate the voxelsoutside of the torso volume with the closest limb associated with thedefault pose. For example, the target recognition, analysis, andtracking system may compare the position or location including theX-value, Y-value, and depth value of each of the voxels outside of thetorso volume with the default positions or locations including theX-values, Y-values, and depth values of the default limbs such as thedefault left arm, right arm, left leg, right leg, or the like. Thetarget recognition, analysis, and tracking system may then associateeach of the voxels outside the torso volume with the default limb thatmay have the closest location or position based on the comparison.

The target recognition, analysis, and tracking system may also re-labelvoxels within the torso volume based on the estimated limbs. Forexample, in one embodiment, at least a portion of an arm such as a leftforearm may be positioned in front of the torso of the human target.Based on the previous position or location of the identified arm, thetarget recognition, analysis, and tracking system may determine orestimate the portion as being associated with the arm as describedabove. For example, the previous position or location of the previouslyidentified limb may indicate that the one or more voxels of a limb suchas an arm of the human target may be within the torso volume. The targetrecognition, analysis, and tracking system may then compare the previouspositions or locations including the X-values, Y-values, and depthvalues of the previously identified limbs such as the previouslyidentified left arm, right arm, left leg, right leg, or the like withthe position or location of voxels included in the torso volume. Thetarget recognition, analysis, and tracking system may then associate andre-label each of the voxels inside the torso volume with the previouslyidentified limb that may have the closest location or position based onthe comparison.

According to one embodiment, after labeling the voxels associated withthe limbs, the target recognition, analysis, and tracking system maydetermine or estimate the location or position of, for example, portionsof the labeled limbs at 320. For example, after labeling the voxelsassociated with the left arm, the right arm, the left leg, and/or theright leg, the target recognition may determine or estimate the locationor position of the hands and/or the elbows of the right and left arms,the knees and/or the feet, the elbows, or the like.

The target recognition, analysis, and tracking system may determine orestimate the location or position of the portions such as the hands,elbows, feet, knees, or the like based on limb averages for each of thelimbs. For example, the target recognition, analysis, and trackingsystem may calculate a left arm average location by adding the X-valuesfor each of the voxels of the associated with the left arm, the Y-valuesfor each of the voxels associated with the left arm, and the depthvalues for each of the voxels associated with the left arm and dividingthe sum of each of the X-values, Y-values, and depth values addedtogether by the total number of voxels associated with the left arm.According to one embodiment, the target recognition, analysis, andtracking system may then define a vector or a line between the leftshoulder and the left arm average location such that the vector or theline between the left shoulder and the left arm average location maydefine a first search direction for the left hand. The targetrecognition, analysis, and tracking system may then search from theshoulders to along the first search direction defined by the vector orthe line for the last valid voxel or last voxel having a valid X-value,Y-value, and/or depth value and may associate the location or positionof the last valid voxel with the left hand.

According to another embodiment, the target recognition, analysis, andtracking system may calculate an anchor point. The target recognition,analysis, and tracking system may then define a vector or a line betweenthe anchor point and one or more of the limb averages such as the leftarm average location such that the vector or the line between the anchorpoint and the limb averages such as the left arm average location maydefine a second search direction for a limb such as the left hand. Thetarget recognition, analysis, and tracking system may then search fromthe anchor point along the second search direction defined by the vectoror the line for the last valid voxel or last voxel having a validX-value, Y-value, and/or depth value and may associate the location orposition of the last valid voxel with the limb such as the left hand.

In an example embodiment, the target recognition, analysis, and trackingsystem may calculate the location or position of the anchor point basedon one or more offsets from other determined extremities such as thehead, hips, shoulders, or the like. For example, the target recognition,analysis, and tracking system may calculate the X-value and the depthvalue for the anchor point by extending the location or position of theshoulder in the respective X-direction and Z-direction by half of theX-value and depth value associated with the location or position of theshoulder. The target recognition, analysis, and tracking system may thenmirror the location or position of the X-value and the depth value forthe anchor point around the extended locations or positions.

The target recognition, analysis, and tracking system may calculate theY-value for the anchor point based on a displacement of the limbaverages locations such as the left arm average location from the headand/or the hips. For example, the target recognition, analysis, andtracking system may calculate the displacement or the difference betweenthe Y-value of the head and the Y-value of the left arm average. Thetarget recognition, analysis, and tracking system may then add thedisplacement or difference to the Y-value of, for example, the center ofthe hips to calculate the Y-value of the anchor point.

The target recognition, analysis, and tracking system may also determineor estimate a location or a position of a right hand, a left foot, and aright foot based on a right arm average location, a left leg averagelocation, and a right leg average location respectively and/or one ormore anchor points calculated therefore using the techniques describedabove with respect to the left arm average location and the left hand.

According to an example embodiment, at 320, the target recognition,analysis, and tracking system may also determine or estimate a locationor a position of extremities such as elbows and knees based onmeasurements of the right and left arm average locations and the rightand the left leg average locations, other extremities such as theshoulders, the hips, the head, measurements of other extremitiescalculated as described below, or the like. For example, the targetrecognition, analysis, and tracking system may determine or estimate thelocation or position of the left elbow based on the left shoulder, lefthand, measurements determined for the left arm as described below, theleft arm average, or the like. In one embodiment, the target,recognition, analysis, and tracking system may determine or estimate,for example, the location or position of the left elbow based on theX-value, the Y-value, and the depth value of the left arm averagelocation. For example, the target recognition, analysis, and trackingsystem may determine the outermost voxels that may define edgesassociated with the left arm. The target recognition, analysis, andtracking system may then adjust the X-value, the Y-value, and the depthvalue of the left arm average location to be to be in the middle orequidistance from the edges. The location or position of the left elbowmay then be estimated based on the adjusted X-value, Y-value, and depthvalue.

FIG. 8 depicts an example embodiment of one or more extremities that maydetermined or estimated for a human target 402 b at 320. As shown inFIG. 8, the target recognition, analysis, and tracking system mayestimate or determine a location or position of a head 810, shoulders816 a-b, a head-to-center vector 812, a centroid 802, hands 822 a-b,hips 818 a-b, feet 824 a-b, or the like for the human target 402 b.

Referring back to FIG. 5, in one embodiment, the target recognition,analysis, and tracking system may then determine whether one or more ofthe locations or positions determined or estimated for the extremitiessuch as the head, the shoulders, the hips, the hands, the feet, or thelike may not have been accurate locations or positions for the actualextremities of the human target at 320. For example, the location orposition of the right hand may be inaccurate such that the location orposition of the right hand may be stuck on or adjacent to the locationor position of the shoulder or the hip.

According to an example embodiment, the target recognition, analysis,and tracking system may include or store a list of volume markers forthe various extremities that may indicate inaccurate locations orposition of the extremities. For example, the list may include volumemarkers around the shoulders and the hips that may be associated withthe hands. The target recognition, analysis, and tracking system maydetermine whether the location or position for the hands may be accuratebased on the volume markers associated with the hands in the list. Forexample, if the location or position of a hand may be within one of thevolume markers associated with the hand in the list, the targetrecognition, analysis, and tracking system may determine that thelocation or position of the hand may be inaccurate. According to oneembodiment, the target recognition, analysis, and tracking system maythen adjust the location or position of the hand to the previousaccurate location of the hand in a previous frame to the currentlocation or position of the hand.

In one example embodiment, at 320, the target recognition, analysis, andtracking system may scan the voxels associated with the isolated humantarget to determine the dimensions of the extremities associatedtherewith. For example, the isolated human target may be scanned todetermine, for example, geometric constraints or measurements such aslengths, widths, or the like associated with the extremities such as thearms, legs, head, shoulders, hips, torso, or the like.

To determine the dimensions, the target recognition, analysis, andtracking system may generate an estimator of proposed joint dimensionsfor each of the extremities. The target recognition, analysis, andtracking system may calculate a mean and a standard deviation for eachof the proposed joint dimensions using the estimators. The targetrecognition, analysis, and tracking system may add the proposed jointdimensions within a defined percentage deviation and the outliers or theproposed joint dimensions outside the defined percentage deviation maybe rejected. The target recognition, analysis, and tracking system maythen determine the dimensions of the extremities based on the estimatorthat may have a highest ratio between the standard deviation thereof andthe number of the proposed joint dimensions.

According to another example embodiment, the target recognition,analysis, and tracking system may use one or more heuristics or rules todetermine whether the dimensions determined by the scan may be correct.For example, the target recognition, analysis, and tracking system use aheuristic or rule that may determine whether the Euclidean distancebetween symmetrical joints may be roughly equivalent, a heuristic orrule that may determine whether the hands and/or elbows near the body, aheuristic and/or rule that may determine whether the head may be lockedin a position or location, a heuristic and/or rule that may determinewhether the hands close to the head, or the like that may be used toadjust the dimensions.

At 325, the target recognition, analysis, and tracking system may tracka model based on the determined or estimated extremities. For example,the target recognition, analysis, and tracking system may generateand/or may include a model such as a skeletal that may have one or morejoints and bones defined therebetween.

FIG. 9 illustrates an example embodiment a model 900 such as a skeletalmodel that may be generated. According to an example embodiment, themodel 900 may include one or more data structures that may represent,for example, a three-dimensional model of a human. Each body part may becharacterized as a mathematical vector having X, Y, and Z values thatmay define joints and bones of the model 900.

As shown in FIG. 9, the model 900 may include one or more joints j1-j16.According to an example embodiment, each of the joints j1-j16 may enableone or more body parts defined there between to move relative to one ormore other body parts. For example, a model representing a human targetmay include a plurality of rigid and/or deformable body parts that maybe defined by one or more structural members such as “bones” with thejoints j1-j16 located at the intersection of adjacent bones. The jointsj1-16 may enable various body parts associated with the bones and jointsj1-j16 to move independently of each other. For example, the bonedefined between the joints j10 and j12, shown in FIG. 9, corresponds toa forearm that may be moved independent of, for example, the bonedefined between joints j14 and j16 that corresponds to a calf

Referring back to FIG. 5, at 325, the target recognition, analysis, andtracking system may adjust one or more body parts such as the jointsj1-j16 of the model based on the location or position estimated ordetermined for the extremities of the human target at 320. For example,the target recognition, analysis, and tracking system may adjust thejoint j l associated with the head to correspond the position orlocation such as the location or position for the head determined at320. Thus, in an example embodiment, the joint j1 may be assigned theX-value, the Y-value, and the depth value associated with the locationor position estimated or determined for the head, which will bedescribed in more detail below.

Additionally, at 325, the target recognition, analysis, and trackingsystem may adjust one or more body parts such as the joints j1-j16 ofthe model using a default location or position for a default pose suchas a T-pose, Di Vinci pose, a natural pose, or the like when, forexample, the target recognition, analysis, and tracking system may nothave determined or estimated locations or positions for one or moreextremities of the human target. For example, the target recognition,analysis, and tracking system may relax one or more body parts such asjoints j1-j16 of the model to the default location or position in thedefault pose. The target recognition, analysis, and tracking system maythen magnetize the one or more of the body parts such as the jointsj1-j16 of the model to the closest voxel of the human target using anysuitable technique. For example, in one embodiment, the targetrecognition, analysis, and tracking system may magnetize the one or morebody parts such as the joints j1-j16 such that the one or more bodyparts may be adjusted to the location or position including, forexample, an X-value, Y-value, and/or depth value (or Z-value) of a voxelof the human target that may be closest in, for example, distance to theone or more body parts of the model in the default pose, which will bedescribed in more detail below.

According to additional embodiments, at 325, the target recognition,analysis, and tracking system may adjust the one or more body partsusing momentum information calculated or determined for the humantarget, recent movements associated with the human target, a location ora position of other extremities of the human target, or any othersuitable information, values, and/or locations or positions associatedwith, for example, the human target and/or the voxels in the grid.

FIG. 10 depicts a flow diagram of an example method for tracking a modelat 325 shown in FIG. 5. For example, as shown in FIG. 5, after one ormore extremities may be determined or estimated at 320, a model may betracked at 325. To track the model at 325, the target recognition,analysis, and tracking system may perform the method or processdescribed below with respect to FIG. 10 below.

In one embodiment, at 1005, a determination may be made regardingwhether a location or position of one or more extremities may have beenestimated or determined. For example, the target recognition, analysis,and tracking system may determine whether a location or position of oneor more extremities of the human target may have been estimated ordetermined, for example, at 320 shown in FIG. 5.

Additionally, at 1005, a determination may be made regarding whether alocation or a position estimated for the one or more extremities may bevalid. According to one embodiment, the target recognition, analysis,and tracking system may determine whether one or more of the locationsor positions determined or estimated for the extremities such as thehead, the shoulders, the hips, the hands, the feet, or the like may nothave been accurate locations or positions for the actual extremities ofthe human target. For example, as described above, the location orposition of the right hand may be inaccurate such that the location orposition of the right hand may be stuck on or adjacent to the locationor position of the shoulder or the hip. Thus, in one embodiment, thetarget recognition, analysis, and tracking system may further verifythat the locations or positions for the one or more extremities may bevalid such that the locations or positions may be accurate for the humantarget at 1005.

At 1010, when a location or position may have been estimated ordetermined for one or more extremities and/or the location or positionmay be valid, one or more body parts of a model associated with the oneor more extremities may be adjusted based on the location or position at1015. According to one embodiment, the target recognition, analysis, andtracking system may adjust the one or more body parts such as the jointsj1-j16 of the model based on the location or position estimated ordetermined for the extremities. For example, the target recognition,analysis, and tracking system may adjust the joint j1 of the modelassociated with the head to the position or location such as thelocation or position determined or estimated for the head 810, at 320,as shown in FIG. 8. Thus, in an example embodiment, the joint j1 may beassigned the X-value, the Y-value, and the depth value associated withthe location or position estimated or determined for the head 810 asdescribed above. Additionally, the target recognition, analysis, andtracking system may adjust additional body parts such as the jointsj2-j16 to a location or position of an extremity such as the hands,feet, elbows, knees, shoulders, hips, or the like associated with therespective joints j2-j16.

At 1010, when a location or position may not have been estimated ordetermined for one or more extremities of the human target and/or thelocation or position may not be valid, one or more body parts of themodel may be relaxed at 1020. For example, in one embodiment, the targetrecognition, analysis, and tracking system may relax one or more bodyparts such as the joints j1-1j16 of the model based on a defaultlocation or position in a default pose at 1020. To relax one or morebody parts of the model, the target recognition, analysis, and trackingsystem may adjust the one or more body parts to the default location orposition such that that the one or more body parts may return to aneutral pose or default pose such as a T-pose, Di Vinci pose, a naturalpose, or the like. Thus, in one embodiment, at 1010, the targetrecognition, analysis, and tracking system may adjust a body part suchas the joint j9-j12 to default location or positions including defaultX-values, Y-values, and depth values for a left and right elbow and aleft and right hand in a default pose when a location or a position maynot have been estimated for the left and right elbow and the left andright hand associated with the human target.

At 1025, one or more body parts of the model may then be magnetized to aclosest voxel associated with, for example, the human target. Forexample, in one embodiment, the target recognition, analysis, andtracking system may position the model over the human target in the gridof voxels, at 1025, such that the model may be imposed or overlaid onthe human target. The target recognition, analysis, and tracking systemmay then magnetize or adjust the one or more body parts such as thejoints j1-j16 of the model to a location or position of a voxelassociated with the human target that may be closest to the defaultlocation or position of the one or more body parts. For example, in oneembodiment, the target recognition, analysis, and tracking system mayadjust the one or more body parts such as the joints j1-j16 at thedefault location or position to a location or position including, forexample, an X-value, Y-value, and/or depth value (or Z-value) of a voxelof the human target that may be the closest distance to the defaultposition or location of the one or more body parts in the default posesuch that the one or more body parts may be assigned the X-value,Y-value, and/or depth value of the voxel. According to anotherembodiment, the one or more joints may be magnetized to one or morevoxels based on a surface of the human target. For example, the one ormore body parts may be magnetized to voxels that define a boundary orsurface of the human target in the scene such that the one or more bodyparts of the model may adjusted and/or assigned to a location orposition close to the boundary or surface of the human target.

At 1030, the model including one or more body parts of the model may beadjusted based on a geometric constraint. For example, in oneembodiment, the target recognition, analysis, and tracking system mayfurther adjust a dimension, a location or position, or the like of oneor more body parts such as the joints j1-j16 of the model based on ageometric constraint. According to an example embodiment, the geometricconstraint may include, for example, measurements or dimensions such aslengths and/or widths, angles, positions, shapes, or the like associatedwith the extremities of the human target and/or body parts of a typicalhuman. For example, as described above, the target recognition,analysis, and tracking system may scan voxels associated with the humantarget to determine geometric constraints such as measurements ordimensions, angles, positions, shapes, or the like of the human targetand the extremities associated therewith. According to anotherembodiment, the target recognition, analysis, and tracking system mayinclude geometric constraints such as measurements or dimensions,angles, positions, shapes, or the like of a typical human and typicalbody parts stored therein. For example, the target recognition,analysis, and tracking system may have a geometric constraint that mayinclude a range of values associated with a length of a forearm of atypical human stored therein. Thus, according to an example embodiment,the target recognition, analysis, and tracking system may further adjusta dimension, a location or position, or the like of one or more bodyparts of the model based on one or more geometric constraints determinedfor the human target and/or associated with a typical human at 1030.

At 1035, a determination may be made regarding whether the model may bevalid. For example, in one embodiment, the target recognition, analysis,and tracking system may further determine whether the model includingthe one or more body parts such as the joints j1-j16 of the model may bein a valid pose, whether the model may have conformed appropriately tovalues such as the X-values, Y-values, and/or depth values of the voxelsassociated with the human target, or the like. Thus, in one exampleembodiment, the target recognition, analysis, and tracking system maycheck the model, at 1035, where adjustments to the one or more bodyparts of the model, for example, at 1015, 1025, and/or 1030, may havecaused the model to conform inappropriately to the voxels of the humantarget, to collapse in an invalid pose or an inappropriate manner, orthe like. For example, the target recognition, analysis, and trackingsystem may check to determine whether a body part such as the joints j9and j10, shown in FIG. 9, may be poking out such that the model may bestuck in an invalid pose. According to example embodiments, if the modelmay be invalid such as in invalid pose, not properly conformed to thevoxels, or the like, the target recognition, analysis, and trackingsystem may adjust the one or more body parts of the model to previouslocations or positions that may have been valid or in a valid poseand/or may have conformed properly to the voxels of the human target;may return or render an error message; may adjust the model based onvalues of the pixels associated with the human target in the depthimage, or may perform any other suitable action.

At 1040, one or more body parts of the model may be refined. Forexample, in one embodiment, the target recognition, analysis, andtracking system may refine a location or a position of the one or morebody parts such as the joints j1-j16 of the model. According to oneembodiment, the target recognition, analysis, and tracking system mayfurther refine a location or position of a body part of the model basedon X-values, Y-values, and depth values in the 2-D pixel area of thenon-downsampled depth image received at 305. For example, in oneembodiment, the target recognition, analysis, and tracking system mayuse the data from the non-downsampled depth image to refine the locationor position of the one or more body parts of the model where, forexample, the model may collapse and/or where a location or positiondetermined or estimated for one or more extremity of the human target inthe grid of voxels may be inaccurate or invalid. Additionally, thetarget recognition, analysis, and tracking system may use the data fromthe now-downsampled depth image to refine the location or position ofthe joints of the model associated with frequently used gestures. Forexample, according to one embodiment, the target recognition, analysis,and tracking system may prioritize the joints associated with the hands.At 1040, the target recognition, analysis, and tracking system maylocalize the data around the hand in the non-downsampled depth imagereceived at 305 such that the target recognition, analysis, and trackingsystem may modify the location or position of the body part of the modelassociated with the had using the higher resolution data in thenon-downsampled depth image received at 305.

Referring back to FIG. 5, at 330, the model may be processed. Forexample, in one embodiment, the target recognition, analysis, andtracking system may process the model by, for example, mapping one ormore motions or movements applied to the adjusted model to an avatar orgame character such that the avatar or game character may be animated tomimic the user such as the user 18 described above with respect to FIGS.1A and 1B. For example, the visual appearance of an on-screen charactermay be changed in response to changes to the model being adjusted.

In another embodiment, the target, recognition, analysis, and trackingsystem may process the model by providing the model to a gestureslibrary in a computing environment such as the computing environment 12described above with respect to FIGS. 1A-4. The gestures library maythen be used to determine controls to perform within an applicationbased on positions of various body parts of the model.

It should be understood that the configurations and/or approachesdescribed herein are exemplary in nature, and that these specificembodiments or examples are not to be considered limiting. The specificroutines or methods described herein may represent one or more of anynumber of processing strategies. As such, various acts illustrated maybe performed in the sequence illustrated, in other sequences, inparallel, or the like. Likewise, the order of the above-describedprocesses may be changed.

The subject matter of the present disclosure includes all novel andnonobvious combinations and subcombinations of the various processes,systems and configurations, and other features, functions, acts, and/orproperties disclosed herein, as well as any and all equivalents thereof.

What is claimed:
 1. A method for tracking a user comprising: receiving adepth image that was captured by a depth camera; identifying anestimated location or position of a part of the user in the depth image;adjusting a model of the user based on the estimated location orposition of the part of the user; and in response to a failure toidentify a location or position of the part of the user in a seconddepth image, adjusting the model to move the location or position of thepart of the user in the model to a default position of the part of theuser.
 2. The method of claim 1, further comprising: mapping the model toan on screen avatar.
 3. The method of claim 1, further comprising:providing the model to a gesture library.
 4. The method of claim 1,wherein the model comprises a skeletal model having joints and bones. 5.The method of claim 4, wherein adjusting the model comprises: adjustinga joint of the skeletal model to the estimated location or position. 6.The method of claim 1, further comprising: determining that theestimated location or position is valid.
 7. The method of claim 1,further comprising: adjusting the model based on a geometric constraint.8. The method of claim 1, wherein the default pose comprises: a T-Pose,a Di Vinci pose, or a natural pose.
 9. The method of claim 1, furthercomprising: magnetizing the model to one or more of the pixels in thedepth image.
 10. The method of claim 1, further comprising: determiningthat a pose associated with the model is valid.
 11. The method of claim1, further comprising: refining the model based on the received depthimage.
 12. The method of claim 1, further comprising: downsampling thepixels in the depth image before identifying the estimated location orposition of the extremity of the user.
 13. A computer readable storagemedium for tracking a user, the computer readable storage medium havingstored thereon computer executable instructions that, when executed on acomputer, cause the computer to perform operations comprising: receivinga depth image; identifying an estimated location or position of a partof the user in the depth image; adjusting a model of the user based onthe estimated location or position of the part of the user; and inresponse to a failure to identify a location or position of the part ofthe user in a second depth image, adjusting the model to move thelocation or position of the part of the user in the model to a defaultposition of the part of the user.
 14. The computer readable storagemedium of claim 13, further bearing computer-executable instructionsthat, when executed on the computer, cause the computer to performoperations comprising: mapping the model to an on screen avatar.
 15. Thecomputer readable storage medium of claim 13, further bearingcomputer-executable instructions that, when executed on the computer,cause the computer to perform operations comprising: providing the modelto a gesture library.
 16. The computer readable storage medium of claim13, wherein the model comprises: a skeletal model having joints andbones.
 17. The computer readable storage medium of claim 13, wherein theinstructions further comprise: determining whether the estimatedlocation or position is valid.
 18. A system for tracking a usercomprising: a processor; and a memory communicatively coupled to theprocessor when the system is operational, the memory bearingprocessor-executable instructions that, when executed on the processor,cause the system to at least: receive a depth image; identify anestimated location or position of a part of the user in the depth image;adjust a model of the user based on the estimated location or positionof the part of the user; and in response to a failure to identify alocation or position of the part of the user in a second depth image,adjust the model to move the location or position of the part of theuser in the model to a default position of the part of the user.
 19. Thesystem of claim 18, wherein the memory further bearsprocessor-executable instructions that, when executed on the processor,cause the system to at least: map the model to an on screen avatar. 20.The system of claim 18, wherein the memory further bearsprocessor-executable instructions that, when executed on the processor,cause the system to at least: provide the model to a gesture library.